import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import '../res/style.dart';
class ToolBarTitleItem extends StatelessWidget {
  final String title;
  const ToolBarTitleItem({Key? key, required this.title}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final topH = MediaQuery
        .of(context)
        .padding
        .top;
    return _toobarItem(top: topH,title: title);
  }


  _toobarItem({required double top,required String title}) {
    return Container(
      width: double.infinity,
      height: top + 40,
      color: Colors.transparent,
      child: Padding(
        padding: EdgeInsets.only(left: 15, right: 15, top: top),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            GestureDetector(
              onTap: Get.back,
              child: Container(
                decoration: BoxDecoration(
                  // color: const Color(0x99A9A9A9),
                  borderRadius: BorderRadius.circular(150),
                ),
                width: 45.w,
                height: 25.h,
                child: const Icon(
                  Icons.arrow_back_ios,
                  color: Colors.white,
                  size: 20,
                ),
              ),
            ),
            Text(
              title,
              style: Styles.style_white_18_bold,
            ),
            Box.hBox45,
          ],
        ),
      ),
    );
  }
}
